package interfaz;

import java.awt.BorderLayout;
import java.awt.FlowLayout;

import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.Clip;
import javax.sound.sampled.LineUnavailableException;
import javax.sound.sampled.UnsupportedAudioFileException;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.JLabel;
import javax.swing.ImageIcon;
import javax.swing.LayoutStyle.ComponentPlacement;
import java.awt.Font;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.io.IOException;




public class Exito extends JDialog {

	private final JPanel contentPanel = new JPanel();
	private int mon=0;
	private int rub=0;
	private int ani=0;
	private int dia=0;
	private int col=0;
	private Clip sonidoFinal;

	
	public Exito(final JFrame frame, boolean b, double moneda, double rubi, double anillo, double diamante, double colgante){
		
		
		super(frame,b);
		mon=(int)moneda;
		rub=(int)rubi;
		ani=(int)anillo;
		dia=(int)diamante;
		col=(int)colgante;
		

		 try
	     {
		 sonidoFinal=AudioSystem.getClip();
	     sonidoFinal.open(AudioSystem.getAudioInputStream(getClass().getResourceAsStream("/imagenes/temafinal.wav")));
	     sonidoFinal.start();
	     }   
	      
		 catch(UnsupportedAudioFileException ee){} 
		 catch(IOException ea){} 
		 catch(LineUnavailableException LUE){};    	
		
		
	}

	public void configurar() {
		  PnlFondoJDialog pnlFondo = new PnlFondoJDialog(mon, rub, ani, dia, col);
	      setLocationRelativeTo(null);
	      setResizable(false);
	      this.add(pnlFondo, BorderLayout.CENTER);
	      this.pack();
		
	}
}